<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        table {
            margin: auto;
            border: 1px solid #bfbce2;
            margin-top: 50px;

        }

        tr {
            text-align: center;
        }

        th {
            height: 50px;
            background-color: #dcd9fa;
            border: 1px solid #bfbce2;
        }

        td {
            height: 50px;
            border: 1px solid #bfbce2;
        }

    </style>
</head>
<body>
    <div class="container">
        <table cellspacing="0" cellpadding="0">
            <tr>
                <th>用户</th>
                {% for item in question %}
                <th style="width:200px;">{{item.questionContent}}</th>
                {% endfor %}
                <th>总分</th>
            </tr>
            {% for u in user %}
            <tr>
                <td style="width:150px;">{{u.username}}</td>
                {% for item in u.answers %}
                <td>{{item.score}}</td>
                {% endfor %}
                <td style="width:150px;">{{u.count}}</td>
            </tr>
            {% endfor %}

        </table>
    </div>
</body>
</html>